package com.joyintech.util;


import com.joyintech.vo.OpmPageCtl;

/**
 * 返回Response构造体
 *
 * @param <T> 数据结构体
 * @author chenzhuo
 * @version 1.0 2020年9月19日
 * @see ResponseData
 * @since 1.0
 */
public class ResponseData<T> {

    /**
     * 返回Response的Code
     */
    private String responseCode;

    /**
     * 返回Response的Message
     */
    private String responseMessage;

    /**
     * 返回Response的数据构造体
     */
    private T data;

    /**
     * 核心分页控制字段
     */
    private OpmPageCtl opmPageCtl;

    public OpmPageCtl getOpmPageCtl() {
        return opmPageCtl;
    }

    public void setOpmPageCtl(OpmPageCtl opmPageCtl) {
        this.opmPageCtl = opmPageCtl;
    }

    public ResponseData() {

    }
    /**
     * 构造函数
     *
     * @param code ZhfxCode
     */
    public ResponseData(ZhfxCode code) {
        this.responseCode = code.name();
        this.responseMessage = code.getMessage();
    }

    /**
     * 构造函数（带变量）
     *
     * @param code ZhfxCode
     * @param args 变量List
     */
    public ResponseData(ZhfxCode code, Object... args) {
        this.responseCode = code.name();
        this.responseMessage = code.getMessage(args);
    }
    /**
     * 获取 responseCode
     *
     * @return responseCode.
     */
    public String getResponseCode() {
        return responseCode;
    }

    /**
     * 设置 responseCode
     *
     * @param responseCode responseCode
     */
    public void setResponseCode(String responseCode) {
        this.responseCode = responseCode;
    }

    /**
     * 获取 responseMessage
     *
     * @return responseMessage.
     */
    public String getResponseMessage() {
        return responseMessage;
    }

    /**
     * 设置 responseMessage
     *
     * @param responseMessage responseMessage
     */
    public void setResponseMessage(String responseMessage) {
        this.responseMessage = responseMessage;
    }

    /**
     * 获取 data
     *
     * @return data.
     */
    public T getData() {
        return data;
    }

    /**
     * 设置 data
     *
     * @param data data
     */
    public void setData(T data) {
        this.data = data;
    }


}
